package com.example.common.fraction;


import com.example.common.model.bean.JVideo;
import com.example.commonlib.base.presenter.RequirePresenter;
import com.example.commonlib.base.view.SuperFraction;
import com.example.common.ResourceTable;
import ohos.agp.components.*;
import ohos.hiviewdfx.HiLog;
import ohos.hiviewdfx.HiLogLabel;


@RequirePresenter(VideoPresenter.class)
public class VideoFraction extends SuperFraction<VideoPresenter> {
    private static final HiLogLabel LABEL = new HiLogLabel(HiLog.LOG_APP, 0x00201, "test001");


    public VideoFraction() {
        super(ResourceTable.Layout_video_fraction,true);
        HiLog.error(LABEL, "*****************VideoFraction******************");
    }

    public void setData(JVideo[] data){
        HiLog.error(LABEL, "*****************VideoFraction setData showEmpty******************");
        if(data.length == 0){
            showEmpty();
        }else{
            showContent();
        }
    }

    @Override
    public void onErrorRetry(Component v) {
        HiLog.error(LABEL, "*****************VideoFraction onErrorRetry******************");
        getPresenter().getData(true);
    }
}
